#ifndef DYNAMIC_SPRITE_H
#define DYNAMIC_SPRITE_H

#include "Sprite.h"
#include "Vector2.h"

namespace gaim{

    //Class for dynamic (moving) Sprites
    class DynamicSprite: public Sprite{
    private:
        Vector2 velocity_;
    protected:
        DynamicSprite(const std::map<std::string, Image>& images, const std::string& startingImage,
                      const Point2& pos, const Vector2& vel, const int& z);
    public:
        static DynamicSprite* getInstance(const std::map<std::string, Image>& images,
                                          const std::string& startingImage, const Point2& pos, const int& z);

        static DynamicSprite* getInstance(const std::map<std::string, Image>& images, const std::string& startingImage,
                                          const Point2& pos, const Vector2& vel, const int& z);

        void update(const std::set<Sprite*>& sprites, const double dt);

        void move(const double x, const double y);
        void move(const Vector2& vec);

        void setVel(const Vector2& vel);
        void accelerate(const Vector2& acc);

        const Vector2& getVel() const;
    };

}

#endif
